<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>06 判断新老用户</title>
</head>

<body>


    <script>
        window.onload = function() {
            if (localStorage.first) {
                console.log('老用户')
            } else {
                console.log('新用户')
            }
        }
    </script>
</body>

</html>